<template>
  <el-dialog title="详情" :visible.sync="visible" @close="$emit('update:visible', false)" destroy-on-close>
    <el-form :model="content" label-width="150px" inline label-position="left">
      <el-form-item prop="avatar" label="用户头像" v-if="content['avatar']">
        <div class="userCk">
          <el-avatar size="large" :src="content['avatar']"></el-avatar>
        </div>
      </el-form-item>
      <el-form-item prop="id" label="用户ID">
        <div class="userCk">
          {{content.id}}
        </div>
      </el-form-item>
      <el-form-item prop="nickname" label="用户昵称">
        <div class="userCk">
          {{content.nickname}}
        </div>
      </el-form-item>
      <el-form-item prop="mobile" label="用户电话">
        <div class="userCk">
          {{content.mobile}}
        </div>
      </el-form-item>
      <el-form-item prop="identity" label="用户身份">
        <div class="userCk">
          {{content.identity}}
        </div>
      </el-form-item>
      <el-form-item prop="parentId" label="推荐人员">
        <div class="userCk">
          {{content.parentId}}
        </div>
      </el-form-item>
<!--      <el-form-item prop="availablePointsNum" label="用户积分">-->
<!--        <div class="userCk">-->
<!--          {{formatNumber(content.availablePointsNum)}}-->
<!--        </div>-->
<!--      </el-form-item>-->
<!--      <el-form-item prop="ranking" label="排名">-->
<!--        <div class="userCk">-->
<!--          {{content.ranking}}-->
<!--        </div>-->
<!--      </el-form-item>-->

<!--      <el-form-item prop="username" label="用户名">-->
<!--        <div class="userCk">-->
<!--          {{content.username}}-->
<!--        </div>-->
<!--      </el-form-item>-->


<!--      <el-form-item prop="isManager" label="是否为分公司负责人">-->
<!--        <div class="userCk">-->
<!--          {{ $getDictLabel("isManager", content.isManager) }}-->
<!--        </div>-->
<!--      </el-form-item>-->
      <el-form-item prop="availableEdouNum" label="余额">
        <div class="userCk">
          {{formatNumber(content.availableEdouNum)}}
        </div>
      </el-form-item>


      <el-form-item prop="bankName" label="收款银行" v-if="content['bankName']">
        <div class="userCk">
          {{content.bankName}}
        </div>
      </el-form-item>
      <el-form-item prop="bankNumber" label="收款人账号" v-if="content['bankNumber']">
        <div class="userCk">
          {{content.bankNumber}}
        </div>
      </el-form-item>
      <el-form-item prop="bankUsername" label="收款人姓名" v-if="content['bankUsername']">
        <div class="userCk">
          {{content.bankUsername}}
        </div>
      </el-form-item>
      <el-form-item prop="createDate" label="加入时间">
        <div class="userCk">
          {{content.createDate}}
        </div>
      </el-form-item>
    </el-form>
    <template slot="footer">
      <el-button @click="$emit('update:visible', false)">取消</el-button>
    </template>
  </el-dialog>
</template>
<script>
import {formatNumber, getDictLabel} from "@/utils";

export default {
  name: 'ComUserList',
  data() {
    return {}
  },
  props: {
    content:Object,
    visible:Boolean
  },
  methods: {
    formatNumber,
    getDictLabel
  }
}
</script>
<style>
  .userCk{
    width: 260px;
    font-weight: 700;
  }
</style>
